package com.atguigu.mapreduce.source.impl;

import com.atguigu.mapreduce.source.GeneralSource;

import java.util.Random;

public class OrderSource extends GeneralSource {
    private final StringBuilder sb = new StringBuilder();
    private final Random random = new Random();
    private int id = 0;

    @Override
    public String getLine() {
        sb.setLength(0);
        sb.append(id++)
                .append(",")
                .append(1 + random.nextInt(99))
                .append(",")
                .append(1000 + random.nextInt(50000000));
        return sb.toString();
    }
}
